﻿@inject Microsoft.AspNetCore.Identity.SignInManager<ApplicationUser> _signInManager



@if (_signInManager.IsSignedIn(User))
{
    <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle text-dark" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">
            Hello @(User.FindFirst("UserFirstName").Value + " " + User.FindFirst("UserLastName").Value)
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" asp-controller="Account" asp-action="Logout">Logout</a>
            <a class="dropdown-item" asp-controller="Account" asp-action="ChangePassword">Change Password</a>
        </div>
    </li>

}
else
{
    <li class="nav-item">
        <a class="btn btn-outline-primary" asp-controller="Account" asp-action="Login" asp-route-returnUrl="@Context.Request.Path">
            Login
        </a>

        <a class="btn btn-primary" asp-controller="Account" asp-action="SignUp">
            Register
        </a>
    </li>
}